<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增工资详情')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-content-add">
            <input type="hidden" name="salaryId" id="salaryId" th:value="${salaryId}">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">员工：</label>
                <div class="col-sm-8">
                    <div class="input-group">
                        <input id="treeId" name="userId" type="hidden" />
                        <input class="form-control" type="text" onclick="selectUserTree()" id="treeName" readonly="true">
                        <span class="input-group-addon"><i class="fa fa-search"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">工资类别：</label>
                <div class="col-sm-8">
                    <select name="salaryType" id="salaryType" class="form-control m-b" th:onchange="changeType()">
                        <option value="1">在职职工</option>
                        <option value="2">退休职工</option>
                        <option value="3">铁路退休职工</option>
                        <option value="4">临时工</option>
                    </select>
                </div>
            </div>
            <div id="div1">
                <div class="form-group">
                    <label class="col-sm-3 control-label">薪级工资：</label>
                    <div class="col-sm-8">
                        <input name="a0" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">教护百分之十：</label>
                    <div class="col-sm-8">
                        <input name="a1" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">基础绩效：</label>
                    <div class="col-sm-8">
                        <input name="a2" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">基础绩效奖：</label>
                    <div class="col-sm-8">
                        <input name="a31" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">岗位工资：</label>
                    <div class="col-sm-8">
                        <input name="a3" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">效益工资四：</label>
                    <div class="col-sm-8">
                        <input name="a4" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">夜班绩效：</label>
                    <div class="col-sm-8">
                        <input name="a5" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">管理绩效：</label>
                    <div class="col-sm-8">
                        <input name="a6" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">门诊考核绩效：</label>
                    <div class="col-sm-8">
                        <input name="a7" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">会诊绩效：</label>
                    <div class="col-sm-8">
                        <input name="a8" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">效益工资一：</label>
                    <div class="col-sm-8">
                        <input name="a9" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">效益工资二：</label>
                    <div class="col-sm-8">
                        <input name="a10" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">效益工资三：</label>
                    <div class="col-sm-8">
                        <input name="a11" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">保健：</label>
                    <div class="col-sm-8">
                        <input name="a12" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">发一：</label>
                    <div class="col-sm-8">
                        <input name="a13" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">发二：</label>
                    <div class="col-sm-8">
                        <input name="a14" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">发三：</label>
                    <div class="col-sm-8">
                        <input name="a15" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">公务交贴：</label>
                    <div class="col-sm-8">
                        <input name="a16" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">取暖费：</label>
                    <div class="col-sm-8">
                        <input name="a17" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">独子：</label>
                    <div class="col-sm-8">
                        <input name="a18" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">应发合计：</label>
                    <div class="col-sm-8">
                        <input name="a19" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">会费：</label>
                    <div class="col-sm-8">
                        <input name="a20" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">养老保险：</label>
                    <div class="col-sm-8">
                        <input name="a21" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">医疗保险：</label>
                    <div class="col-sm-8">
                        <input name="a22" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">失业保险：</label>
                    <div class="col-sm-8">
                        <input name="a23" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">住房公积金：</label>
                    <div class="col-sm-8">
                        <input name="a24" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">扣二：</label>
                    <div class="col-sm-8">
                        <input name="a25" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">扣减：</label>
                    <div class="col-sm-8">
                        <input name="a26" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">个人所得税：</label>
                    <div class="col-sm-8">
                        <input name="a27" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">扣款合计：</label>
                    <div class="col-sm-8">
                        <input name="a28" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">实发合计：</label>
                    <div class="col-sm-8">
                        <input name="a29" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">计税基数：</label>
                    <div class="col-sm-8">
                        <input name="a30" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">工资所属日：</label>
                    <div class="col-sm-8">
                        <input name="a32" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">爱心一日捐：</label>
                    <div class="col-sm-8">
                        <input name="a33" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">职业年金：</label>
                    <div class="col-sm-8">
                        <input name="a34" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">在附5：</label>
                    <div class="col-sm-8">
                        <input name="a35" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div id="div2">
                <div class="form-group">
                    <label class="col-sm-3 control-label">月增离退休费：</label>
                    <div class="col-sm-8">
                        <input name="b1" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">月增离退休补贴：</label>
                    <div class="col-sm-8">
                        <input name="b2" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">物业补贴：</label>
                    <div class="col-sm-8">
                        <input name="b3" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">退休补贴2：</label>
                    <div class="col-sm-8">
                        <input name="b4" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">零五岗：</label>
                    <div class="col-sm-8">
                        <input name="b5" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">按年龄增加：</label>
                    <div class="col-sm-8">
                        <input name="b6" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">保留部分：</label>
                    <div class="col-sm-8">
                        <input name="b7" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">护龄：</label>
                    <div class="col-sm-8">
                        <input name="b8" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">房贴：</label>
                    <div class="col-sm-8">
                        <input name="b9" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">房贴二：</label>
                    <div class="col-sm-8">
                        <input name="b10" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">统一补贴：</label>
                    <div class="col-sm-8">
                        <input name="b11" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">过节费：</label>
                    <div class="col-sm-8">
                        <input name="b12" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">薪级工资：</label>
                    <div class="col-sm-8">
                        <input name="b13" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">岗位津贴：</label>
                    <div class="col-sm-8">
                        <input name="b14" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">零七增资：</label>
                    <div class="col-sm-8">
                        <input name="b15" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">零八增资：</label>
                    <div class="col-sm-8">
                        <input name="b16" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">遗属补助：</label>
                    <div class="col-sm-8">
                        <input name="b17" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">补发：</label>
                    <div class="col-sm-8">
                        <input name="b18" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">退休预支金：</label>
                    <div class="col-sm-8">
                        <input name="b19" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">党支部工作补助：</label>
                    <div class="col-sm-8">
                        <input name="b20" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">应发合计：</label>
                    <div class="col-sm-8">
                        <input name="b21" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">扣二：</label>
                    <div class="col-sm-8">
                        <input name="b22" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">大病保险：</label>
                    <div class="col-sm-8">
                        <input name="b23" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">扣款合计：</label>
                    <div class="col-sm-8">
                        <input name="b24" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">实发合计：</label>
                    <div class="col-sm-8">
                        <input name="b25" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">年终奖：</label>
                    <div class="col-sm-8">
                        <input name="b26" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">退附1：</label>
                    <div class="col-sm-8">
                        <input name="b27" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">退附2：</label>
                    <div class="col-sm-8">
                        <input name="b28" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">退附3：</label>
                    <div class="col-sm-8">
                        <input name="b29" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">退附4：</label>
                    <div class="col-sm-8">
                        <input name="b30" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div id="div3">
                <div class="form-group">
                    <label class="col-sm-3 control-label">月增离退休费：</label>
                    <div class="col-sm-8">
                        <input name="c1" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">国发八二号：</label>
                    <div class="col-sm-8">
                        <input name="c2" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">工龄工资：</label>
                    <div class="col-sm-8">
                        <input name="c3" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">九三工改增发：</label>
                    <div class="col-sm-8">
                        <input name="c4" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">零六工改增发：</label>
                    <div class="col-sm-8">
                        <input name="c5" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">月增离退休补贴：</label>
                    <div class="col-sm-8">
                        <input name="c6" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">护龄津贴：</label>
                    <div class="col-sm-8">
                        <input name="c7" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">三次职务补贴：</label>
                    <div class="col-sm-8">
                        <input name="c8" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">零四岗：</label>
                    <div class="col-sm-8">
                        <input name="c9" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">零五岗：</label>
                    <div class="col-sm-8">
                        <input name="c10" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">生活补贴：</label>
                    <div class="col-sm-8">
                        <input name="c11" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">地方补贴：</label>
                    <div class="col-sm-8">
                        <input name="c12" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">物业补贴：</label>
                    <div class="col-sm-8">
                        <input name="c13" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">工资附加：</label>
                    <div class="col-sm-8">
                        <input name="c14" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">按年龄增加离退休费：</label>
                    <div class="col-sm-8">
                        <input name="c15" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">乘车费：</label>
                    <div class="col-sm-8">
                        <input name="c16" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">小房贴：</label>
                    <div class="col-sm-8">
                        <input name="c17" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">房贴：</label>
                    <div class="col-sm-8">
                        <input name="c18" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">护理费：</label>
                    <div class="col-sm-8">
                        <input name="c19" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">统一补贴：</label>
                    <div class="col-sm-8">
                        <input name="c20" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">节日费：</label>
                    <div class="col-sm-8">
                        <input name="c21" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">离休待遇：</label>
                    <div class="col-sm-8">
                        <input name="c22" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">移交互济：</label>
                    <div class="col-sm-8">
                        <input name="c23" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">发一：</label>
                    <div class="col-sm-8">
                        <input name="c24" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">一次性防暑降温费：</label>
                    <div class="col-sm-8">
                        <input name="c25" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">应发合计：</label>
                    <div class="col-sm-8">
                        <input name="c26" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">扣一：</label>
                    <div class="col-sm-8">
                        <input name="c27" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">扣款合计：</label>
                    <div class="col-sm-8">
                        <input name="c28" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">实发合计：</label>
                    <div class="col-sm-8">
                        <input name="c29" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">年终奖：</label>
                    <div class="col-sm-8">
                        <input name="c30" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">铁附1：</label>
                    <div class="col-sm-8">
                        <input name="c31" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">铁附2：</label>
                    <div class="col-sm-8">
                        <input name="c32" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">铁附3：</label>
                    <div class="col-sm-8">
                        <input name="c33" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">铁附4：</label>
                    <div class="col-sm-8">
                        <input name="c34" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">铁附5：</label>
                    <div class="col-sm-8">
                        <input name="c35" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div id="div4">
                <div class="form-group">
                    <label class="col-sm-3 control-label">应发金额：</label>
                    <div class="col-sm-8">
                        <input name="d1" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">疫情防控补贴：</label>
                    <div class="col-sm-8">
                        <input name="d2" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">实发金额：</label>
                    <div class="col-sm-8">
                        <input name="d3" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">岗位：</label>
                    <div class="col-sm-8">
                        <input name="d4" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">补贴：</label>
                    <div class="col-sm-8">
                        <input name="d5" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">夜班：</label>
                    <div class="col-sm-8">
                        <input name="d6" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">绩效：</label>
                    <div class="col-sm-8">
                        <input name="d7" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">总额：</label>
                    <div class="col-sm-8">
                        <input name="d8" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">临附1：</label>
                    <div class="col-sm-8">
                        <input name="d9" class="form-control" type="text">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">临附2：</label>
                    <div class="col-sm-8">
                        <input name="d10" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <textarea name="remark" class="form-control"></textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "record/salary/content"
        $("#form-content-add").validate({
            focusCleanup: true
        });

        $(function (){
            changeType();
        })

        function changeType() {
            var salaryType = $("#salaryType").val();
            if(salaryType == '1') {
                document.getElementById("div1").style.display = "block";
                document.getElementById("div2").style.display = "none";
                document.getElementById("div3").style.display = "none";
                document.getElementById("div4").style.display = "none";
            } else if(salaryType == '2') {
                document.getElementById("div1").style.display = "none";
                document.getElementById("div2").style.display = "block";
                document.getElementById("div3").style.display = "none";
                document.getElementById("div4").style.display = "none";
            } else if(salaryType == '3') {
                document.getElementById("div1").style.display = "none";
                document.getElementById("div2").style.display = "none";
                document.getElementById("div3").style.display = "block";
                document.getElementById("div4").style.display = "none";
            } else if(salaryType == '4') {
                document.getElementById("div1").style.display = "none";
                document.getElementById("div2").style.display = "none";
                document.getElementById("div3").style.display = "none";
                document.getElementById("div4").style.display = "block";
            }
        }

        /* 选择人员 */
        function selectUserTree() {
            var options = {
                title: '选择员工',
                width: "380",
                url: ctx + "basic/user/selectTree",
                callBack: doSubmit
            };
            $.modal.openOptions(options);
        }

        function doSubmit(index, layero){
            var body = layer.getChildFrame('body', index);
            var treeType = body.find('#treeType').val();
            if(treeType == 'user'){
                var id = body.find('#treeId').val();
                var treeId = id.substring(id.indexOf('_') + 1, id.length);
                $("#treeId").val(treeId);
                $("#treeName").val(body.find('#treeName').val());
                layer.close(index);
                checkSalaryContent();
            }else{
                $.modal.alertError("请选择员工");
            }
        }

        function checkSalaryContent(){
            $.ajax({
                type: "post",
                url: prefix + "/checkSalaryContent",
                dataType: 'json',
                data: {
                    userId: $("#treeId").val(),
                    salaryId: $("#salaryId").val()
                },
                success: function(r) {
                    if (r.code != web_status.SUCCESS) {
                        $.modal.msgError('当前人员已存在工资记录');
                    }
                    $.modal.closeLoading();
                }
            });
        }

        function submitHandler() {
            if ($.validate.form()) {
                var treeId = $("#treeId").val();
                if(treeId == '') {
                    $.modal.msgError('请先选择员工');
                    return;
                }
                $.operate.save(prefix + "/add", $('#form-content-add').serialize());
            }
        }
    </script>
</body>
</html>